<template>
  <div id='CartList'>
    <b-scroll class="listhi" ref="scroll">
      <cart-list-item v-for="(item,index) in cartlist" :key="index" :goods="item"></cart-list-item>
    </b-scroll>

  </div>
</template>

<script>
  import { mapGetters } from 'vuex'
  import CartListItem from './CartListItem.vue'
  import BScroll from 'components/common/BetterScroll/BScroll.vue'



  export default {
    name: 'CartList',
    data() {
      return {}
    },
    components: {
      CartListItem,
      BScroll,

    },
    computed: {
      ...mapGetters(['cartlist'])
    },

    methods: {

    },
    activated() {
      this.$refs.scroll.refresh()
    }
  }
</script>

<style scoped>
  #CartList {
    position: relative;
    height: 100vh;
  }

  .listhi {
    position: absolute;
    top: 44px;
    left: 0;
    right: 0;
    bottom: 79px;
    overflow: hidden;
  }
</style>